function plot(data){
	data = data.splice(0, 100); 
	
	var margin = {top: 10, right: 10, bottom: 20, left: 40},
		width = 960 - margin.left - margin.right,
		height = 500 - margin.top - margin.bottom;

	var svg = d3.select('body').append('svg') 
		.attr('width', width + margin.left + margin.right)
		.attr('height', height + margin.top + margin.bottom)
	  .append('g')
		.attr('transform','translate(' + margin.left + ',' + margin.top + ')');
	
	var n = data.length; 
	var min = Infinity, max = -Infinity;
	for(var i in data){
		if (min>data[i][4]) min = data[i][4];
		if (max<data[i][4]) max = data[i][4];
	}
	
	var xScaler = d3.scale.linear()
		.domain([data[n-1][0]/1000, data[0][0]/1000])
		.range([0, width]);
		
	var yScaler = d3.scale.linear()
		.domain([min, max])
		.range([height, 0]);

	var xAxis = d3.svg.axis()
		.scale(xScaler)
		.orient('bottom');
		
	var yAxis = d3.svg.axis()
		.scale(yScaler)
		.orient('left');
		 
	svg.append('g')
	    .attr('class', 'x axis')
	    .attr('transform', 'translate(0,' +  height +  ')')
	    .call(xAxis);

	svg.append('g')
		.attr('class', 'y axis')
		.call(yAxis);


	var line = d3.svg.line()
		.x(function(d){ return xScaler(d[0]); })
		.y(function(d){ return yScaler(d[4]); }); 
	
	svg.datum(data)
		.append('path')
		.attr('class', 'line')
		.attr('d', line ); 

	
}